package org.tony.common.lang;

import java.util.Arrays;

import junit.framework.TestCase;

public class StringUtilsDemo extends TestCase
{
  public void testSplit()
  {
    String str = "第1千八百章中国人";
    String regex = "(第)(.+)(章)(\\s*)(.*)";
    String[] result = StringUtils.split(str, regex);
    System.out.println(Arrays.toString(result));
    System.out.println(Arrays.toString(str.split(regex)));

    String demo = "1##2##3##4##5";
    System.out.println(Arrays.toString(StringUtils.split(demo, "章")));

    System.out.println(str.replace("第.+章", "第1000章"));
  }
}
